<?php

namespace Gairal\CoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Experience
 *
 * @ORM\Table(name="gairal_experience")
 * @ORM\Entity(repositoryClass="Gairal\CoreBundle\Entity\ExperienceRepository")
 */
class Experience
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=100)
     * @Assert\NotBlank()
     * @Assert\Length(min="3")
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="text", nullable=true)
     */
    private $description;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_in", type="date")
     */
    private $dateIn;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_out", type="date", nullable=true)
     */
    private $dateOut;

    /**
     * @var string
     *
     * @ORM\Column(name="place", type="string", length=50)
     * @Assert\NotBlank()
     * @Assert\Length(min="3")
     */
    private $place;

    /**
     * @var string
     *
     * @ORM\Column(name="website", type="string", length=255)
     * @Assert\NotBlank()
     */
    private $website;

    /**
     * @var string
     *
     * @ORM\Column(name="job_title", type="string", length=100)
     * @Assert\NotBlank()
     * @Assert\Length(min="3")
     */
    private $jobTitle;

    /**
     * @var string
     *
     * @ORM\Column(name="accomplishments", type="text")
     * @Assert\NotBlank()
     * @Assert\Length(min="10")
     */
    private $accomplishments;

    /**
     * @var integer
     *
     * @ORM\Column(name="display_order", type="smallint")
     */
    private $displayOrder;

    /**
     * @var string
     *
     * @ORM\ManyToOne(targetEntity="Gairal\CoreBundle\Entity\Image")
     * @ORM\JoinColumn(nullable=true)
     */
    private $image;

    /**
     * @var string
     *
     * @ORM\ManyToMany(targetEntity="Gairal\CoreBundle\Entity\Skill", inversedBy="experiences")
     * @ORM\JoinColumn(nullable=true)
     */
    private $skills;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Experience
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Experience
     */
    public function setDescription($description)
    {
        $this->description = $description;
    
        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set dateIn
     *
     * @param \DateTime $dateIn
     * @return Experience
     */
    public function setDateIn($dateIn)
    {
        $this->dateIn = $dateIn;
    
        return $this;
    }

    /**
     * Get dateIn
     *
     * @return \DateTime 
     */
    public function getDateIn()
    {
        return $this->dateIn;
    }

    /**
     * Set dateOut
     *
     * @param \DateTime $dateOut
     * @return Experience
     */
    public function setDateOut($dateOut)
    {
        $this->dateOut = $dateOut;
    
        return $this;
    }

    /**
     * Get dateOut
     *
     * @return \DateTime 
     */
    public function getDateOut()
    {
        return $this->dateOut;
    }

    /**
     * Set place
     *
     * @param string $place
     * @return Experience
     */
    public function setPlace($place)
    {
        $this->place = $place;
    
        return $this;
    }

    /**
     * Get place
     *
     * @return string 
     */
    public function getPlace()
    {
        return $this->place;
    }

    /**
     * Set website
     *
     * @param string $website
     * @return Experience
     */
    public function setWebsite($website)
    {
        $this->website = $website;
    
        return $this;
    }

    /**
     * Get website
     *
     * @return string 
     */
    public function getWebsite()
    {
        return $this->website;
    }

    /**
     * Set jobTitle
     *
     * @param string $jobTitle
     * @return Experience
     */
    public function setJobTitle($jobTitle)
    {
        $this->jobTitle = $jobTitle;
    
        return $this;
    }

    /**
     * Get jobTitle
     *
     * @return string 
     */
    public function getJobTitle()
    {
        return $this->jobTitle;
    }

    /**
     * Set accomplishments
     *
     * @param string $accomplishments
     * @return Experience
     */
    public function setAccomplishments($accomplishments)
    {
        $this->accomplishments = $accomplishments;
    
        return $this;
    }

    /**
     * Get accomplishments
     *
     * @return string 
     */
    public function getAccomplishments()
    {
        return $this->accomplishments;
    }

    /**
     * Set displayOrder
     *
     * @param integer $displayOrder
     * @return Experience
     */
    public function setDisplayOrder($displayOrder)
    {
        $this->displayOrder = $displayOrder;
    
        return $this;
    }

    /**
     * Get displayOrder
     *
     * @return integer 
     */
    public function getDisplayOrder()
    {
        return $this->displayOrder;
    }

    /**
     * Set image
     *
     * @param \Gairal\CoreBundle\Entity\Image $image
     * @return Experience
     */
    public function setImage(\Gairal\CoreBundle\Entity\Image $image = null)
    {
        $this->image = $image;
    
        return $this;
    }

    /**
     * Get image
     *
     * @return \Gairal\CoreBundle\Entity\Image 
     */
    public function getImage()
    {
        return $this->image;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->skills = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add skills
     *
     * @param \Gairal\CoreBundle\Entity\Skill $skills
     * @return Experience
     */
    public function addSkill(\Gairal\CoreBundle\Entity\Skill $skills)
    {
        $this->skills[] = $skills;
    
        return $this;
    }

    /**
     * Remove skills
     *
     * @param \Gairal\CoreBundle\Entity\Skill $skills
     */
    public function removeSkill(\Gairal\CoreBundle\Entity\Skill $skills)
    {
        $this->skills->removeElement($skills);
    }

    /**
     * Get skills
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getSkills()
    {
        return $this->skills;
    }
}